<@appointmentTabs tab='day' form=appointmentForm context=context> <@row> <@columns lg=10 id='fc-calendar-col'> <@div id='calendar' class='fc fc-ltr'> <@div class='fc-toolbar fc-header-toolbar'> <@div class='fc-left'> <@tform class='d-inline-block' id='manage_appointmentdesk' name='manage_appointmentdesk' action='jsp/admin/plugins/appointment/modules/desk/ManageAppointmentDesks.jsp' method='get'> <#assign dDay = day?date> <#assign pDay = dDay?long - (1 * 24 * 60 * 60 * 1000)> <@input type='hidden' name='id_form' value='${idForm!1}' /> <@input type='hidden' name='day' value='${pDay?number_to_date}' /> <@input type='hidden' name='context' value='${context}' /> <@button type='submit' color='primary' size='sm' title='#i18n{appointment.appointmentApp.previousDay}' buttonIcon='chevron-left' /> <@div class='fc-center'> <@p>${day!''} <#if day?date?string != .now?date?string > <@tform class='d-inline-block'name='manage_appointmentdesk' action='jsp/admin/plugins/appointment/modules/desk/ManageAppointmentDesks.jsp' method='get'> <#assign dDay = .now> <@input type='hidden' name='id_form' value='${idForm!1}' /> <@input type='hidden' name='day' value='${dDay?date}' /> <@input type='hidden' name='context' value='' /> <@div class='fc-right'> <@tform class='d-inline-block' name='manage_appointmentdesk' action='jsp/admin/plugins/appointment/modules/desk/ManageAppointmentDesks.jsp' method='get'> <#assign nDay = dDay?long + (1 * 24 * 60 * 60 * 1000)> <@input type='hidden' name='id_form' value='${idForm!1}' /> <@input type='hidden' name='day' id='day-3' value='${nDay?number_to_date}' /> <@input type='hidden' name='context' value='${context}' /> <@button type='submit' color='primary' size='sm' title='#i18n{appointment.appointmentApp.nextDay}' buttonIcon='chevron-right' /> <#if permission_add_comment?boolean><@button id='toggle-add-comment' color='secondary' size='sm' buttonIcon='message-plus' title='#i18n{appointment.create_comment.pageTitle}' hideTitle=['all'] params='data-bs-toggle="offcanvas" data-bs-target="#commentModal"' /> <#if list_slot?has_content> <#-- Check if day selected is less than today, if < 0 the add desk button is not displayed --> <#assign isLteToday = (day?date?long / 86400000)?round - (.now?date?long / 86400000)?round + 1 /> <#if activateEditMode && isLteToday gte 0><@button type='button' color='secondary' size='sm' params='data-bs-toggle="offcanvas" data-bs-target="#deskModal"' title='#i18n{appointmentdesk.manage_appointmentdesks.label.addDesk}' hideTitle=['all'] buttonIcon='desktop' /> <#if list_slot?has_content> <@div class='fc-clear' /> <@div class='fc-view-container ui-widget'> <@div class='fc-view fc-agendaWeek-view fc-agenda-view'> <@table id='selectable' class='clearfix' headBody=true> <@tr> <@th /> <#assign x=numb_desk> <#list 1..x as seq> <@th>#i18n{module.appointment.desk.label.desk} #i18n{module.appointment.desk.label.deskNo}${seq} <@th class='header-surbook bg-danger'>#i18n{module.appointment.desk.label.surbooking} <@tr> <@td params='colspan="${x}"'> <#if list_comments?has_content> <#list list_comments as comment> <#assign comment_class=''/> <#if ( comment.startingValidityTime?? && comment.startingValidityTime == '00:00' && comment.endingValidityTime?? && comment.endingValidityTime == '00:00' )><#assign comment_class=' allday'/> <#compress><#assign comment_title>${comment.comment?replace('\n', '')?replace('\r', '')?replace('\rn', '')?replace('\'', ''')} <@div class="fc-content"> <@span class="fc-title"> <@p> <#if ( comment.startingValidityTime?? && comment.startingValidityTime != '00:00' && comment.endingValidityTime?? && comment.endingValidityTime != '00:00' )> ${comment.startingValidityTime!}/${comment.endingValidityTime!} ${comment_title!?remove_beginning('

')?remove_ending('

')?replace('\\\\"', '\\"')?replace('\\"', '\"')}
<@td class='bg-danger' /> <@tableHeadBodySeparator /> <#assign idx=1> <#list list_slot?sort_by('startingDateTime') as slot> <@tr class='${strClass!}'> <@td params='data-selectable="row" data-head-start="${slot.startingDateTime?datetime.iso?string["HH:mm"]}"'>${slot.startingTime!} <#setting datetime_format="iso"> <#list 1..x as seq> <@td class='${strClass!} place desk-${seq} slot-${slot.idSlot!} start-${slot.startingDateTime?datetime.iso?string["ddMM-HHmm"]} selectable ${slot.isOpen?then((seq - slot.maxCapacity lte 0)?then("slot-open","slot-close"),"slot-close")}' params='data-start="${slot.startingDateTime!?datetime.iso?string["HHmm"]}" data-end="${slot.endingDateTime!?datetime.iso?string["HHmm"]}" data-marker=".desk-${seq}.slot-${slot.idSlot!}.start-${slot.startingDateTime?datetime.iso?string["ddMM-HHmm"]}" data-slot="{'idSlot':'${slot.idSlot!}','startingDateTime':'${slot.startingDateTime}','endingDateTime':'${slot.endingDateTime}','maxCapacity':'${slot.maxCapacity}','isOpen':'${slot.isOpen?then("true","false")}','isSpecific':'${slot.isSpecific?c}','idForm':'${slot.idForm!1}'}"' /> <@td class='desk-${x+1} start-${slot.startingDateTime?datetime.iso?string["ddMM-HHmm"]} bg-danger is-surbook' params='data-slot=""' /> <#assign idx=false> <#else> <@card> <@empty title='#i18n{module.appointment.desk.message.noDataAvailable}' iconName='calendar-off' /> <@columns lg=2 class='d-none d-lg-block' id='fc-sidebar-col'> <@div id='mini-calendar' class='sticky-top' params='style="top:80px"' /> <@modal id='qModal'> <@modalBody> <@p id='loader' class='text-center'> <@icon style='loader' class='fa-spin fa-5x' /> <@span class='sr-only'>#i18n{module.appointment.desk.message.labelLoading} <@modal id='slottoggle' size='sm'> <@modalBody> <@div class='ms-3'> <@radioButton id='doOpenSlot' name='doManageSlot' value='1' labelKey='#i18n{module.appointment.desk.label.open}' /> <@radioButton id='doCloseSlot' name='doManageSlot' value='0' labelKey='#i18n{module.appointment.desk.label.close}' /> <@div class='text-center'> <@button id='saveSlotState' color='primary' title='#i18n{module.appointment.desk.label.save}' /> <@button id='cancelSlotState' color='secondary' title='#i18n{module.appointment.desk.label.cancel}' params='data-bs-dismiss="modal" aria-label="#i18n{module.appointment.desk.label.cancel}"' /> <#if activateEditMode> <@offcanvas id='deskModal' title='#i18n{module.appointment.desk.increment.defaultTitle}' btnTitle='' btnIcon='' btnClass='visually-hidden' position='end' size='sm'> <@tform id='form-validate' action='jsp/admin/plugins/appointment/modules/desk/ManageAppointmentDesks.jsp' enctype='multipart/form-data'> <@input type='hidden' name='action' value='incrementMaxCapacity' /> <@input type='hidden' name='id_form' value='${idForm!}' /> <@input type='hidden' id='day' name='day' value='${day!}' /> <@formGroup labelFor='incrementing_value' labelKey='#i18n{module.appointment.desk.increment.labelIncrementingValue}' helpKey='${formGroupHelpKey!}' mandatory=true> <@input type='number' name='incrementing_value' id='incrementing_value' value='1' maxlength=2 params='onkeypress="return validateQty(event);"' min=1 max=10 /> <@formGroup labelFor='type' labelKey='#i18n{module.appointment.desk.increment.labelType}'> <@select name='type' id='type' items=list_types default_value='' /> <@formGroup labelFor='startingDate' labelKey='#i18n{module.appointment.desk.increment.labelStartingDate}'> <@input type='date' name='starting_date' id='startingDate' value='${day!}' /> <@formGroup labelFor='startingTime' labelKey='#i18n{module.appointment.desk.increment.labelStartingTime}'> <@input type='time' name='starting_time' id='startingTime' value='' /> <@formGroup labelFor='endingDate' labelKey='#i18n{module.appointment.desk.increment.labelEndingDate}'> <@input type='date' name='ending_date' id='endingDate' value='${day!}' /> <@formGroup labelFor='endingTime' labelKey='#i18n{module.appointment.desk.increment.labelEndingTime}'> <@input type='time' name='ending_time' id='endingTime' value='' /> <@formGroup> <@button type='submit' name='save' id='save' buttonIcon='check' title='#i18n{module.appointment.desk.increment.labelValidate}' /> <@getCommentModal 'commentModal' '#i18n{appointment.create_comment.pageTitle}' "comment" "startingValidityDate" "endingValidityDate" "idStartingTime" "idEndingTime" "doAddComment" idForm mailing_list locale "appointmentdesk" '${context!}-${day!}' /> <@getCommentModal 'modify-comment' '#i18n{appointment.modify_comment.pageTitle}' "comment" "modifyStartingValidityDate" "modifyEndingValidityDate" "idModifyStartingTime" "idModifyEndingTime" "doModifyComment" idForm mailing_list locale "appointmentdesk" '${context!}-${day!}' /> <#if activateEditMode> <#include "/admin/util/editor/editor.html" /> <@initEditor type='comment' />